Rails.application.routes.draw do

  resources :carousels
  resources :posts
  resources :sessions, only: [:new, :create, :destroy]
  mount Ckeditor::Engine => '/ckeditor'

  match 'login'  => 'sessions#new', as: :login,  via: [:get]
  get 'logout' => 'sessions#destroy', as: :logout, via: [:delete]

  get 'home_pages/post_view/:id' => "home_pages#post_view"

  root "home_pages#home_page"
  # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
end

